package com.smart.campus.school.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.smart.campus.school.mapper.ExamAnswerMapper;
import com.smart.campus.school.domain.ExamAnswer;
import com.smart.campus.school.service.IExamAnswerService;
import com.smart.campus.common.core.text.Convert;

/**
 * 试题答案Service业务层处理
 * 
 * @author Zhihe.Li
 * @date 2020-05-20
 */
@Service
public class ExamAnswerServiceImpl implements IExamAnswerService 
{
    @Autowired
    private ExamAnswerMapper examAnswerMapper;

    /**
     * 查询试题答案
     * 
     * @param id 试题答案ID
     * @return 试题答案
     */
    @Override
    public ExamAnswer selectExamAnswerById(Long id)
    {
        return examAnswerMapper.selectExamAnswerById(id);
    }

    /**
     * 查询试题答案列表
     * 
     * @param examAnswer 试题答案
     * @return 试题答案
     */
    @Override
    public List<ExamAnswer> selectExamAnswerList(ExamAnswer examAnswer)
    {
        return examAnswerMapper.selectExamAnswerList(examAnswer);
    }

    /**
     * 新增试题答案
     * 
     * @param examAnswer 试题答案
     * @return 结果
     */
    @Override
    public int insertExamAnswer(ExamAnswer examAnswer)
    {
        return examAnswerMapper.insertExamAnswer(examAnswer);
    }

    /**
     * 修改试题答案
     * 
     * @param examAnswer 试题答案
     * @return 结果
     */
    @Override
    public int updateExamAnswer(ExamAnswer examAnswer)
    {
        return examAnswerMapper.updateExamAnswer(examAnswer);
    }

    /**
     * 删除试题答案对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteExamAnswerByIds(String ids)
    {
        return examAnswerMapper.deleteExamAnswerByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除试题答案信息
     * 
     * @param id 试题答案ID
     * @return 结果
     */
    @Override
    public int deleteExamAnswerById(Long id)
    {
        return examAnswerMapper.deleteExamAnswerById(id);
    }
}
